<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Chameleon-Mini: ISO14443A Reader Functionality</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Chameleon-Mini
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="index.html">index</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">ISO14443A Reader Functionality </div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><p>The ChameleonMini is able to act as an ISO 14443A reader. This page describes how to use this configuration (See <a class="el" href="_page__configurations.html">Configurations</a>) correctly.</p>
<h1>Supported Commands </h1>
<p>Using the ISO 14443A reader configuration enables the usage of some commands that are only available within this configuration.</p>
<dl class="section note"><dt>Note</dt><dd>Technically, the <code>SEND</code> and <code>SEND_RAW</code> commands are also <a class="el" href="_page__command_line.html#Anchor_TimeoutCommands">timeout commands</a>, but they end successfully (either with <code>NO DATA</code> or the response) nearly immediately on every call.</dd>
<dd>
Each of the following commands returns <code>INVALID COMMAND USAGE</code> on a non-reader <a class="el" href="_page__configurations.html">configuration</a>.</dd></dl>
<dl class="section warning"><dt>Warning</dt><dd>The reader field is only turned on if this is necessary. Some commands deactivate the reader field after they are done, some do not deactivate the reader field after finishing. Please be aware, that the reader field takes a massive amount of energy and thus the voltage of the battery can drop to a critical level fastly. If not mentioned differently, all of the commands below deactivate the reader field after work.</dd></dl>
<h2><code>SEND &lt;BYTEVALUE&gt;</code> </h2>
<p>There are two cases what is done, depending on the parameter:</p><ol type="1">
<li>If the parameter is one byte, no parity bits are added, since this must be a short frame command. In this case the seven least significant bits are sent.</li>
<li>If the parameter consists of more than one byte, parity bits are added and afterwards the whole sequence is sent.</li>
</ol>
<p>After sending, the ChameleonMini waits for an answer and returns either</p><ul>
<li><code>NO DATA</code> if no answer could be detected or</li>
<li>the received data with removed parity bits, a 2-byte big-endian value indicating the bit count and either the string <code>PARITY OK</code> or <code>PARITY ERR</code> indicating whether the parity check failed or not.</li>
</ul>
<p>In each case, the ChameleonMini code <code>101:OK WITH TEXT</code> is returned.</p>
<h3>Examples</h3>
<ul>
<li><code>SEND 52</code> sends the <code>WUPA</code> command</li>
<li><code>SEND 9320</code> sends the <code>ANTICOLLISION</code> command</li>
<li><code>SEND AB2</code> returns <code>INVALID PARAMETER</code> since the parameter is no byte sequence</li>
</ul>
<dl class="section warning"><dt>Warning</dt><dd>This command does not deactivate the reader field after finishing in order to make it possible to keep up the conversation with the card.</dd></dl>
<h2><code>SEND &lt;2-BYTEVALUE&gt; &lt;BYTEVALUE&gt;</code> </h2>
<p>Does the same like the command with only one parameter, but the first parameter indicates the to-be-sent bit count.</p>
<dl class="section warning"><dt>Warning</dt><dd>If the bit count parameter is neither 7 or a multiple of 8, no parity bits will be appended, but the remaining functionality is the exact same!</dd></dl>
<h3>Examples</h3>
<ul>
<li><code>SEND 0007 26</code> sends the <code>REQA</code> command</li>
<li><code>SEND 0010 9320</code> sends the <code>ANTICOLLISION</code> command</li>
<li><code>SEND 0012 13DE4A</code> sends (on bit-processing-layer) SOC - 1100 1000 0111 1011 01 - EOC. The remaining bits are discarded. Note that the byte sequence is interpreted as little-endian and the bits are sent in reverse-order, just like defined in the ISO. Note also, that no parity bits are added, since <code>0x12</code> is neither 7 nor a multiple of 8.</li>
<li><code>SEND 0300 52</code> returns <code>INVALID PARAMETER</code> since the second parameter does not contain 768 bits.</li>
</ul>
<dl class="section warning"><dt>Warning</dt><dd>This command does not deactivate the reader field after finishing in order to make it possible to keep up the conversation with the card.</dd></dl>
<h2><code>SEND_RAW &lt;BYTEVALUE&gt;</code> </h2>
<p>Sends the given byte sequence. The ChameleonMini assumes that the parameter has the parity bits already appended and thus calculates the bit count itself:</p><ul>
<li>If the parameter is one byte, the bit count is set to 7, since this seems to be a short frame.</li>
<li>If the parameter is <em>n</em> bytes long, the ChameleonMini sends <code>floor(n * 16 / 9)</code> bits.</li>
</ul>
<p>After sending, the ChameleonMini waits for an answer and returns either</p><ul>
<li><code>NO DATA</code> if no answer could be detected or</li>
<li>the raw received data (including parity bits) and a 2-byte big-endian value indicating the bit count</li>
</ul>
<h3>Examples</h3>
<ul>
<li><code>SEND_RAW 52</code> sends the <code>WUPA</code> command.</li>
<li><code>SEND_RAW 934100</code> sends the <code>ANTICOLLISION</code> command as the bit sequence SOC - 1100 1001 1 0000 0100 0 - EOC is sent, which is the same as <code>0x9320</code> with parity bits.</li>
<li><code>SEND_RAW AB2</code> returns <code>INVALID PARAMETER</code> since the parameter is no byte sequence</li>
</ul>
<dl class="section warning"><dt>Warning</dt><dd>This command does not deactivate the reader field after finishing in order to make it possible to keep up the conversation with the card.</dd></dl>
<h2><code>SEND_RAW &lt;2-BYTEVALUE&gt; &lt;BYTEVALUE&gt;</code> </h2>
<p>Does the same like the command with only one parameter, but the first parameter indicates the to-be-sent bit count.</p>
<h3>Examples</h3>
<ul>
<li><code>SEND_RAW 0007 26</code> sends the <code>REQA</code> command</li>
<li><code>SEND_RAW 0012 934100</code> sends the <code>ANTICOLLISION</code> command</li>
<li><code>SEND_RAW 0012 934100AB</code> also sends the <code>ANTICOLLISION</code> command, since remaining bits are discarded</li>
<li><code>SEND_RAW 0300 52</code> returns <code>INVALID PARAMETER</code> since the second parameter does not contain 768 bits.</li>
</ul>
<dl class="section warning"><dt>Warning</dt><dd>This command does not deactivate the reader field after finishing in order to make it possible to keep up the conversation with the card.</dd></dl>
<h2><code>GETUID</code> </h2>
<p>This is a <a class="el" href="_page__command_line.html#Anchor_TimeoutCommands">timeout command</a>. It tries to obtain the UID from a card that is in reader range and returns it.</p>
<p>If this command is called within the reader configuration, it either ends up returning <code>101:OK WITH TEXT</code> and the UID or with a timeout (no matter if on setting/configuration change or on real timeout).</p>
<h2><code>DUMP_MFU</code> </h2>
<p>This is a <a class="el" href="_page__command_line.html#Anchor_TimeoutCommands">timeout command</a>. It tries to read the whole content of a MiFare Ultralight card that is in reader range and returns the content.</p>
<p>If this command is called within the reader configuration, it either ends up returning <code>101:OK WITH TEXT</code> and the card content in 4 lines (each line contains 16 bytes) or with a timeout (no matter if on setting/configuration change or on real timeout).</p>
<h2><code>IDENTIFY</code> </h2>
<p>This is a <a class="el" href="_page__command_line.html#Anchor_TimeoutCommands">timeout command</a>. Tries to identify the type of a card in reader range and returns the type.</p>
<p>If this command is called within the reader configuration, it ends in one of three ways:</p><ol type="1">
<li>Return code <code>101:OK WITH TEXT</code>, the card type and ATQA value, UID value and SAK value of the highest cascade level.</li>
<li>Return code <code>101:OK WITH TEXT</code>, the information that this card type is unknown to the ChameleonMini ("Unknown card.") and ATQA value, UID value and SAK value of the highest cascade level.</li>
<li>Timeout (no matter if on setting/configuration change or on real timeout).</li>
</ol>
<h2><code>AUTOCALIBRATE</code> </h2>
<p>This is a <a class="el" href="_page__command_line.html#Anchor_TimeoutCommands">timeout command</a>. Tries to select to a card with every threshold within a range with a specific step size and chooses the best threshold.</p>
<p>If this command is called within the reader configuration, it ends in one of the following ways:</p><ol type="1">
<li>Return code <code>101:OK WITH TEXT</code> and a list of the tested thresholds with a <code>+</code> for every threshold where the select protocol was successful and a <code>-</code> if the select protocol was not successfully finished.</li>
<li>Timeout (no matter if on setting/configuration change or on real timeout).</li>
</ol>
<dl class="section note"><dt>Note</dt><dd>If no working threshold was found, the threshold is reset to the standard threshold. </dd></dl>
</div></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Thu Mar 17 2022 12:03:24 for Chameleon-Mini by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>
